package com.chat.utils;

import java.util.Random;

public class AccountGenerator {

    public static String generateAccount() {
        Random random = new Random();
        int length = random.nextInt(4) + 9; // 9-12位
        StringBuilder account = new StringBuilder();

        // 生成第一位
        int first = random.nextInt(9) + 1;
        account.append(first);

        // 生成剩余位
        for (int i = 1; i < length; i++) {
            account.append(random.nextInt(10));
        }

        return account.toString();
    }
}

